finally the main functionnality is here...