runs init function