moved x and y into position struct