added hash index function
added compression function