changed Post method to put method