pass document array to mathod which returns document's class name