added more plugin host code