completed function to add new bug