descriptions added above pseudo-code