add tests
try catch block around attemptosend