function pointers used for init