use enum instead of int

(minor)