tests added, unrefactored