added the convert wherestatement to string function