Create basefunc