fixed input output format and parsing