clean up and improve