pull out deleted code into a plugin