adjusted docu and register decoding