added latchmanager.c