fixed bugs in input file