introduced two modes (assignment parts 1 and 2)