added proper error checking
0.0.4