clean up
a lot of code