changed specs to more concise match_array function