fix buy in mkngram separate function, not sure what the bug was, but it works now