bunch of changes, removing the trap from the parent script