modified getResultClass.