Well you should move the whole thing out and use params.pp instead where the logic already exists.