refactor the variants of boxUnboxStart