bouncing balls addapted by Fran Prieto