adjusted parse file and output