sooo close to delete function