and another refactoring
more detailed panic in getRegister