added amilyafet's current version of the factory