added support for delay