Final commit

added exceptions and test file