removed redundant codes