added delay estimation and clock sync