add Version support
small bug fixes