minor code optimization.