Add tasks update function