some cosmetic changes for better validation