hooked up api PUT and POST
merged in alex work