tests added, refactoring