Updated code for getting different versions