enum instead of int for return values in handlers