update for arbitrary x and y