Modified Put code