data needs to be encoded