remove redundancy code