made instance variables for x,y,view