with logical clock, not yet fully tested