End function when new entry is added