working on worker thread, still need to do main function