adjust code segments