Try removing duplicate code