check enum properly