add generic method to get config