Second task, working but slow