Adding simple update function