run_once function used instead of old autorun method