add getBytes method