merge from kaffa's maser with updates