wrote basic function tests