Add register get function