First iteration of all the needed query function for Zoltan-