receiving value from function to ball1 variable