streamlined array reading somewhat