minor bugfix of homework2, working on binreader(hw3)