executes all queries