Added register functionality