compute arrays