changed complete methods to PUT
added ajax PUT method to front end