rest of subtask 3d