Registration logic added