simplify code by using TrapSimpAccess function where appropriate