add code documentation and connexity test