add init with function pointers