Updated with delete functions