Simple segment picking code