First part of if action