rewrote totalGuards
wrote insertUnder