Added keyedFactory private method