starting main function and send_task function