example code added in comments