refactor some of the goal test methods to handle connection to the database