more streamlined code for version handling