adding lock and comment