queries are executed based on a user given choice.