added try catch to methods