refactor pt 1