Making both codes compatible