removed redundant code.