sol2 works for naive cases
sol of q041