Refactored init to return array instead of write to global variable