revert some changes in the code because it doesnt work in my iphone