add version cmp func