minor code re-org