added registration functionality