implemented run_once function to autorun programs at startup just once