reinstating some deleted code