add functions to vector2 and ball class