removal of redundant code