Project4 solution