added optional delay to the create loop