Added register owner function.