implement class resolving