portier legacy code