a few internal improvements