add check for className being defined