add check on hash length >0