added registration although I don't think it's the right way to do it