changes to example from Amazon server