converted factory methods to initializers, for easier usage with Swift
apps