completed solution for review