Created methods for put and post