swapping sqlite for pg