change recently added factories to declare specific return types for improved documentation and to aid stub generation