Support generic queries and added calculate tuition.