review the code make the code works on iphone