added option to set element to fetch data from when calling getData