add changes to support generic lists as well as arrays. 

Might not handle other IEnumerable<T> types which don't derive from List<T> though. 

Give back to the community!