fixed bug where predict gave the entire gram
everything seems to be working
test file