some generic improvements