added register function, working on readme