better deprecation check