removed redundant code copies