Working prototype
Added exception case for testing