use coffeescript for segment.