replace long with Duration for delay