Delete duplicated code