just make opendata a function