added more flexible config