made last changes and tests for P3