add Try Catch and some fail safes