removed 2 function and put the code in the main code

get rid of 2 function to be able to manipulate the module more easilly