updated the lib and hash implementations