Add registration function