some more changes and simplifications