Shahar's code

Modified