implement method waitToRead()