added more flexibility to getDataList