Deleted the waiting code and modified the diagram