made position an instance variable of piece