adding registration functionality