Revised code