adding works but updating is still buggy