detecting change on edit