minor code simplifications