Make add/update functions to return ID