finished newpin api support