minor code modernization