try catch added to repository