Getting rid of unnecessary enumeration