fixed hash and added test