All of the validation checks prior to this are now duplicated in the helper method. The local variables (e.g. x_coords and x_coord) are not needed later in this function so the duplicate checks can safely be removed from here.