make getsequence look more like matlab file