updates to fix errors, try catch, etc