adding thread to take care of mac issue