improve deprecation warning messages

close #417