changed try catch of both registermodel methods