wip - encoding string data to conform db query requirements