renamed and optimized factories