Added registration function