Use representation class for casting