Working on phi function...