First, naive version of repacker