add data to post function