use guard instead of if