[BF] $data may not be set causing error and also issue with combining arrays within called fn