another code improvements