I fixed duplicate code