some minor code improvement