changed data type of segment type to int