some try / except blocks added