adding version support and smarter updating