improve sqlite use