Not too fond of the padding in the if().
If the coding style guidelines have been changed, disregard ;-)