separated concerns in init function