modify api for query result