added initial registration base code
added more documentation