Second approach for implementing registration