add data-sp-events attribute
modification easier to read
add class control function