better way of checking version