revised functional queries