Switch to init function