minor code organization change