added an interface for byte conversion