Working on solution for P39