implement new writing algorithm