added answers to array function (untested)