removed unused method
moved try block