implement autorun mechanism