got rid of redundant second array