removed file IO, vastly sped up program