reshuffle code for debugging