added getbyngram method, also updated open/close methods. only thing left to do after getting creds is correct getpath method