new modified version of latches with setable reset value