begin writing code to account for nested arrays
refactor method to use each_with_index.map methods
remove length check so that nested arrays of one item do not return nil