Convert checkVersion to a class