working version tested in simulator and iPod