added gui and listen/recv threads