added `$register` variable for test - you can register or not