abstract functions modified and tests added