added autodetect plugins functionality