improved deprecation code; add some test