fixed minor bug - reading in the input should have a more robust filter/cleansing function