bug fixes
add debugging messages
geting test code from server