public function toArray() {

        $properties = get_object_vars($this);

        foreach($properties as $var => &$value) {
            if(gettype($value)  === 'object') {
                unset($properties[$var]);
            }
        }

        return $properties;
    }