optimized entity generator