need to work out hash problems