solve p15, p16, p17