Add basic function-pointer logic in main