Add the compact() function