added return value for delay snippet