added validation, error rendering, redirection