init script refactor to adhere latest changes