auto detect current version