removed debugging stuff; wrapped all api reqeusts in 'try'