move clean up above all returns