rearranged pg connection and added buffer to chr region