Integrate old code