create and update data