Enhanced version comparsion logic;