main task almost complete