Replace task-3 solution