update function need to be looked after, but it still runs