basic register access
refactor