removal of surplus code