remove .getBytes duplication