replaced metadata dets with sqlite