convert to binary format