build a common data fetch function named "getRows".
this is trying to abstract a common function to get all the datas.
try to substitute the functions in DEMO which was created manually.