Create Query function implemented with actual record retrieval; yet to do integration testing; stuck with it !!! :(