Refactor: single line conditional (lines 19-25)