initial implementation of doFormatValue