proper way to convert string to []byte