DONE i think

Error handling implemented!!