added debugging/register dump function