added documentation and fixed failing test