update ajax puts method