init function replaced