static public function create(array $data = null)
    {
        if (empty($data["type"]) && isset($data["transaction"])) {
            $type = $data["transaction"]["type"];
        }
        elseif (! $data || empty($data["type"])) {
            return new static($data);
        }
        else {
            $type = $data["type"];
        }

        // valid transaction type input
        $validTypes = array_keys(self::$typesClassMap);
        if (! $type || ! in_array($type, $validTypes)) {
            $type = TransactionType::TRANSFER;
        }

        // mutate transaction (morph specialized class)
        $classTx = self::$typesClassMap[$type];

        if ($type === TransactionType::TRANSFER
            && in_array($data["version"], [self::VERSION_2, self::VERSION_2_TEST, self::VERSION_2_MIJIN])) {

            $classTx = "\\NEM\\Models\\Transaction\\MosaicTransfer";
        }

        return new $classTx($data);
    }