made query function work properly for simple entity store