changing function button to only call for data