Final Version after code swap