add CommandResult to save the query