WIP: refactor first solution