added tests, deprecation warning