separated init from code