minor changes of the code