The solution (unfinished)