try except added