Added chop method replacing the chomp command