make value formatting more flexible