made functions pluggable