only check source/target if it has them
use classed instead of style