refactor pluggable