change API to read external sources