hardened step; removed unused functions