Added bfactoring script