finally got stupid stupid segment working