refactored todo7