changed registermethod