removed redundant code