code refactoring with todd