updated the example removed unnecessary code