using try and except