updated many files

added most of the functionality but i am not able to test properly. I
need to client and server side to send messages properly