Implementation of registration logic