replace class check on independent value with map?