added auto run feature