added monitor function in comments