added hash length option