quick fix to avoid globals, added public $data property