allow direct return of hash if just a buffer