reference key generator works at edit