updated format script