added registration. things should more or less be working