Added register Function.