minor code refinements