minor code organization