added optimization code, projection_all, fk_all and pns for finding the first best dimension