smaller code cleanup