implemented the update from erb file