OK finally fixed and tested register