first version of validator