refactor if () { } else {} to 
if ()
{
  .... 
  return;
}
.....

it is cleaner.