replicating the changes to the current version that derek is working on