real version and other cleanup