write_cmd() and write_data() is not needed anymore