Function completed.
Needs PMD voliations fixes.