added required task #4 and started implementing #5