refactoring with bad form