Handy dandy sendData() function

Why didn't I do this earlier oh right my code is shit