Use enum instead of hardcoded magic values