horrible horrible config parsing