added small delay to force cpu thread context switch for better performance