Added register() method