change plugin into class