better deprecation method