first pattern of registration controller