cleaned up slightly, 1/2 done