Added listItems function and getInput function