compactify a bit