First implementation of registration