Finished the trap method