Unit tests

finished issue #5 and #4