can detect end