used angular.extend to handle default configs