changed gsub to gets.chomp much more elegent