first run at this problem, tests passing