complete code modifications as per solution videos