removed redundancy code