removed redundant array creation