modifed registration functionality.