cleanup and splitting