refactor init method away from closues
refactor init method away from closues