cleaned output format and added support for .predict file