cleaned up first section to make signatures across algorithms
uniform and expanded in the text, accordingly.