last changes and comments added