refactored registration form; added edit