Achieved input exec. Still need piping and tidy up