work on client done in lab

Everything works except threads not closing.