add legacy code to the contrib directory