added newpin api stuff