making the queries base64 encoded