adapt collocation code to new sidebar code