Better usage of enum