update for code review to have a method inside config