before open edit