Trying to figure out how to get class of does not exist and support legecy implementation