#16 Delete duplicated code