added registration validation/ saving work