baseify function
should work