added new functions for data queries