added trap. fixed map