validation working perfectly