oops, finishing refactoring