removed unecessary try catch + refactoring