Added registration function.