turned connction.py into a lib