refactor bytes