cleaned up HashValueJoin and added test