remove non-DRY code.