Place phi functions. Ran but didn't test output.