done before pack