code and test for issue 25, removed unused imports