changed registers() to return a bytearray instead of a string