Added the getBaseFunc function. Not tested.