remove redundant array retrieval