added documentation and parameters