halfway through linking shell to functions