Fixed start and end point analysis, now works with threshold 0.1