refactored antity factories