Extracted a method for co-ordinate validation