cleanup and improve