putting all together, some minor changes.

R.