refactor try/catch and name methods