reordering of the public api function and removal of duplicate, added section comments