added nsmutablearray for the needed heap allocation