Thermal degradation of polystyrene and polyethylene