pretty much done, needs some clean up