removed usleep because it takes too much time.