Created init function