Adding legacy code from the original projet OPS