partially implemented sqlite database lookup