Added sqlite function