fixed front end and added validation tests