replaced query with card