Cleaner implementation using an enum