cleanup initFunciton usage