added clock sync functionality and integration tests