Improve performance of pack