unnecessary duplicated code