Added setData functionality