modify st_writer.hs