corrected documentation and implementation