added register functionality

and tables :P