code and test for issue 25, removed unused imports

Code for Issue #25