moved sql connecton to own module