use data instead of raw bytes