Reduced duplicated code