all algorithms working with hash