added try-catch exception