code reuse cleanup