updates logic