added validation and new features