added error checking + error tests
0.0.2