Official code Modified