implement queue by array