refactor bytes source