Fixed id issues and add update function