added ios sqlite code