code clean for registration