impl array version