Test for condition; move conditional logic to method