edit to support oldpin