duplicated code was removed