I guess we also should check for empty array as using an empty array makes no sense either..