refactored x -> row and y -> column