refactor senddata