more comments added for ease of understanding. knowledge is power!