small update on the regsiter function