migrate lot of convention code