added documentation
changed testing