most of task4 completed, but the mark algorithm not correct