added autostart support