database working well just not on iPad