sorting out validation