refreshing ui on edit