enum improved to work