added getValue, setValue and fix for setDefaultSegment