minor refactoring, removed unnecessary tests