public function queryWithParam(string $query, array $param): PDOStatement
    {
        $statement = $this->prepare($query);

        foreach ($param as $value) {
            $this->checkValue($value);

            //reassign as reference
            //because bindParam need it as reference
            $ref = $value;
            $ref[1] = &$value[1];

            \call_user_func_array([$statement, "bindParam"], $ref);
        }

        $this->lastOperationStatus = $statement->execute();

        return $statement;
    }