move exceptions
update unit testing
correct exceptions and coding style
add first() method