added possibility to choose between holding or input registers