minor code improvements
minor code improvements