implemented random query test compare results