Implemented repacking