better class-name resolver