Made some changes and added user input