#22 fixed bad refactoring