renamed factory and improved mock classes