keep state in array