amended to include user input