added unit tests
got sync distributed test to run
fixed java