Reduce the redundancy of code