Refactory to add init method