prettify code and add a little more overview.