some general improvements