added tests for operator P
improved documentation