base functions implemented
some tests added