reorganized, maybe fixed some things