Add getData functionality to script