changed randomFunc to return that function