validation in main