#34 some minor code improvements