implemented position to index method
implementation of UnitTest for dataAccess methods