small code cleaning/optimization