add value formatting functionality #395