replace some old base/ code