added delay measurement