Add register feature. Does not work yet.