added user input. Fixed bugs reported by rubocop