code shuffle, closer to where it is used