update factory & entities \n add unit test