Avoid duplicated code