small code reusability change