partial solution for 2b