Adding Register Function