Add downgrade functionality (contributed script)