adding some register functionality