add create and update functionality