handled the addition of an array of views more correctly