validate.sh revision 2