same code improvements