changed code to accommodate iphone 4 posting