cs241 mp code