update function

it will do everuthing by own don't worry