temporary parsing code for fixing wrong input files
to be abandoned when input is fixed