improved register manipulation