implement config parsing