fixed an error in the put contents method and added the doc block for
it.