adding back in a wait function