add support for writing constants