more logic in for registration