move stuff around
wait for everything to be done before exiting