different code improvements