adjust code and comments