right before code shuffle. fully working