minor modify to remove one line code