pulled out method to get configuration