added detailed comments
added detailed comments