Further improvements to pipe3.py
added sqlite database