added validation in js that question answered