added edit functionality with registration