played with update function