added ability to process full file instead of specifying opening

also capped ply at 40 because some books have infinite repetition