Added partial solution to ps6.
Completed ps6.