change to work with Array