implemented raw mode, added flags to control handling of value data