Min Avg waiting time - first version - has problem