documentation and implementation modified :))