Procedure for the factory mode