First implementation of validation