implemented values_in_same_row method