#19 improved enum pattern