add register interface, unfinished