Remove Code Duplication