added trap generator