tried implementing Ball class, not working