better ptr support