reshuffling and cleanup