Replaced hard coded segment io key with variable