replaced crappy case with hash generator