Added register function
Merge origin/master