final tweaks -- worked pretty well except for random crashes