add code to delete nodes from frontier