got update function working