Update to init function