Added logiv to catch div and span tags