cleanup and prepared for scaling