trying to get a correct delay time