working on code improvements