you need two separate threads and proper format