A method should have only one exit point, and that should be the last statement in the method.
'if' construct must use '{}'s.
i've formated metod.