added possibility to choose between holding and input registers