import of code from the project in which it was originally written
using library getBytes fn instead of the local hand rolled fn