reshuffling some code