add delay to cleanup functions